package com.iweb.dao;

import com.iweb.entity.Student;

import java.sql.SQLException;
import java.util.List;

/**
 * @author WuYongheng
 * @date 2021/11/29
 * @description
 */
public interface StudentDao {
    /**
     * 新增学生
     *
     * @param student
     * @return
     * @throws SQLException
     */
    int insert(Student student) throws SQLException;

    /**
     * 修改学生
     *
     * @param student
     * @return
     * @throws SQLException
     */
    int update(Student student) throws SQLException;

    /**
     * 删除学生
     *
     * @param studentNo
     * @return
     * @throws SQLException
     */
    int delete(Integer studentNo) throws SQLException;

    /**
     * 根据学号查询
     *
     * @param studentNo
     * @return
     * @throws SQLException
     */
    Student selectById(Integer studentNo) throws SQLException;

    /**
     * 根据姓名模糊查询
     *
     * @param studentName
     * @return
     * @throws SQLException
     */
    List<Student> selectByName(String studentName) throws SQLException;
}
